<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<script type="text/javascript">
function go_reviewwrite(){
	location.href = "../reviewboard/ReviewWriteform.htm";
}
</script>

<style type="text/css">
#tbl				{border-left:1px solid skyblue;border-top:1px solid  skyblue; }
#tbl th, #tbl td	{border-right:1px solid skyblue;border-bottom:1px solid  skyblue; }
</style>
</head>
<body>


<table id="tbl" width="600" cellpadding="0" cellspacing="0">
<tr>
	<th>번호</th>
	<th>제목</th>
	<th>작성자</th>
	<th>날짜</th>
	<th>조회수</th>
</tr>
<c:forEach var="b" items="${list}" varStatus="s">
<tr>
	<td>${max - s.index}</td>
	<td>
		<c:forEach begin="1" end="${b.rboard_tab}">&nbsp;&nbsp;&nbsp;</c:forEach>
		<a href="../reviewboard/ReviewRead.htm?pg=${pg}&num=${b.rboard_num}">${b.rboard_subject}</a>
	</td>
	<td>${b.rboard_writer}</td>
	<td><fmt:formatDate value="${b.rboard_regdate}" pattern="yyyy년 MM월 dd일"/></td>
	<td>${b.rboard_hit}</td>
</tr>
</c:forEach>
</table>
<table width="600">
<tr>
	<td>
<c:if test="${pg > linkSize}">
	[<a href="list.htm?pg=1">◀◀</a>]
	[<a href="list.htm?pg=${pg-1}">◀</a>]
</c:if>
<c:forEach var="i" begin="${startLink}" end="${endLink}">
	<c:if test="${pg == i}">[${i}] </c:if>
	<c:if test="${pg != i}">[<a href="list.htm?pg=${i}">${i}</a>] </c:if>
</c:forEach>
<c:if test="${endLink < totalPage}">
	[<a href="Q&AList.htm?pg=${endLink+1}">▶</a>]
	[<a href="Q&AList.htm?pg=${totalPage}">▶▶</a>]
</c:if>
	</td>
	<td align="right">		
		<input type="button" value="글쓰기" onclick="go_reviewwrite()">
		</td>
</tr>

</table>
</body>
</html>